<template>
   <div class="block">
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page='page'
      :page-sizes="[20, 40, 60, 80]"
      :page-size="pagesize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total">
    </el-pagination>
  </div>
 
</template>

<script>
export default {
  props:['page','pagesize','total'],
  methods: {
      handleSizeChange(val) {
        console.log(`每页 ${val} 条`);
        this.$emit('pagesizeFn',val)
      },
      handleCurrentChange(val) {
        console.log(`当前页: ${val}`);
        this.$emit('pagetranf',val)
      }
    },
    data() {
      return {
        currentPage1: 5,
        currentPage2: 5,
        currentPage3: 5,
        currentPage4: 4
      };
    }
}
</script>

<style lang="less" scoped>
.block{
  text-align: right;
}
</style>>

</style>